<?php get_header(); ?>
  <div id="home" class="section">
    <div class="slideshow column full last">
      <div id="slider" class="nivoSlider">
        <?php
          $args = array(
            'numberposts' => -1,
            'category' => 14,
            'orderby'         => 'post_date',
            'order'           => 'ASC',
          );
          $posts = get_posts($args);
          
          foreach($posts as $post){
          $feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
        ?>
          <img src="<?php echo $feat_image; ?>" data-thumb="<?php echo $feat_image; ?>" alt="" />
        <?php } ?>
      </div>
    </div>
    <div id="worldwide" class="column full last last-row">
      <div class="description">
        <h3>SHIPPED WORLDWIDE</h3>
        <p>No place is too far, no place is unreachable. Wherever you are in the globe, we'll deliver your product right to your doorstep. No hassle no trouble, it never get any easier than this - order your Fresh product today!</p>
      </div>
      <div class="clear"></div>
    </div>
    <div class="clear"></div>
  </div>
	
  <div id="iso" class="section">
    <img src="<?php bloginfo('template_url'); ?>/images/iso.png" />
  </div>
  
	<script>
		function rebind(){
			$('body').on('mouseover', '#products .column', function(){
				grayscale.reset($(this));
			});
			
			$('body').on('mouseout', '#products .column', function(){
				grayscale($(this));
			});
		}
		$(document).ready(function(){
			var img = $('#products').imagesLoaded();
			img.always(function(){
				grayscale($('#products'));
				rebind();
			});
		});
	</script>
	
  <div id="products" class="section">
	
		<!--blood nest s-->
		<div class="column col1 tall">
			<?php
				$id = 129;
				$post = get_post($id);
				$feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
			?>
			<div class="pic container">
				<img src="<?php echo $feat_image; ?>" />
			</div>
			<div class="description red" style="height: 130px;">
				<div class="arrow" style="left: -5px; top: 42px;"></div>
				
				<h3><?php echo $post->post_title; ?></h3>
				<?php echo $post->post_content; ?>
				
        <?php
          $weights = get_field('available_weight');
          $prices = get_field('prices');
          $urls = get_field('product_urls');
          
          $weights = explode('<br />', $weights);
          $prices = explode('<br />', $prices);
          $urls = explode('<br />', $urls);
        ?>
        
        <div class="additional-info">
          <a href="<?php echo $urls[0]; ?>">
            <span class="weight"><?php echo $weights[0]; ?></span>
            <span class="price"><?php echo $prices[0]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
        <div class="additional-info">
          <a href="<?php echo $urls[1]; ?>">
            <span class="weight"><?php echo $weights[1]; ?></span>
            <span class="price"><?php echo $prices[1]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
        <div class="additional-info">
          <a href="<?php echo $urls[2]; ?>">
            <span class="weight"><?php echo $weights[2]; ?></span>
            <span class="price"><?php echo $prices[2]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
					
			</div>
    </div>
		
		<!--white nest s-->
    <div class="column col2 wide last">
			<?php
				$id = 125;
				$post = get_post($id);
				$feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
			?>
		
			<div class="description gray" style="height: 130px;">
				<div class="arrow" style="top: 55px;right: 0px;"></div>
				<h3><?php echo $post->post_title; ?></h3>
				<?php echo $post->post_content; ?>
				
				<?php
          $weights = get_field('available_weight');
          $prices = get_field('prices');
          $urls = get_field('product_urls');
          
          $weights = explode('<br />', $weights);
          $prices = explode('<br />', $prices);
          $urls = explode('<br />', $urls);
        ?>
        
				<div class="additional-info">
          <a href="<?php echo $urls[0]; ?>">
            <span class="weight"><?php echo $weights[0]; ?></span>
            <span class="price"><?php echo $prices[0]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
        <div class="additional-info">
          <a href="<?php echo $urls[1]; ?>">
            <span class="weight"><?php echo $weights[1]; ?></span>
            <span class="price"><?php echo $prices[1]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
        <div class="additional-info">
          <a href="<?php echo $urls[2]; ?>">
            <span class="weight"><?php echo $weights[2]; ?></span>
            <span class="price"><?php echo $prices[2]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
			</div>
			<div class="pic container">
				<img src="<?php echo $feat_image; ?>" />
			</div>
    </div>
		
		<!--orange nest s-->
		<div class="column col2 wide last">
			<?php
				$id = 134;
				$post = get_post($id);
				$feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
			?>
			
			<div class="pic container">
				<img src="<?php echo $feat_image; ?>" />
			</div>
			<div class="description yellow txt-left" style="height: 130px;">
				<div class="arrow rotate" style="top: 50px;left: 0px;"></div>
				<h3><?php echo $post->post_title; ?></h3>
				<?php echo $post->post_content; ?>
				
				<?php
          $weights = get_field('available_weight');
          $prices = get_field('prices');
          $urls = get_field('product_urls');
          
          $weights = explode('<br />', $weights);
          $prices = explode('<br />', $prices);
          $urls = explode('<br />', $urls);
        ?>
        
				<div class="additional-info">
          <a href="<?php echo $urls[0]; ?>">
            <span class="weight"><?php echo $weights[0]; ?></span>
            <span class="price"><?php echo $prices[0]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
        <div class="additional-info">
          <a href="<?php echo $urls[1]; ?>">
            <span class="weight"><?php echo $weights[1]; ?></span>
            <span class="price"><?php echo $prices[1]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
        <div class="additional-info">
          <a href="<?php echo $urls[2]; ?>">
            <span class="weight"><?php echo $weights[2]; ?></span>
            <span class="price"><?php echo $prices[2]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
			</div>
    </div>
		
		<!--white nest ss-->
		<div class="column col2 wide first">
			<?php
				$id = 136;
				$post = get_post($id);
				$feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
			?>
			
			<div class="pic container">
				<img src="<?php echo $feat_image; ?>" />
			</div>
			<div class="description gray txt-left" style="height: 150px;">
				<div class="arrow rotate" style="left: 0px;top: 27px;"></div>
				<h3><?php echo $post->post_title; ?></h3>
				<?php echo $post->post_content; ?>
				
				<?php
          $weights = get_field('available_weight');
          $prices = get_field('prices');
          $urls = get_field('product_urls');
          
          $weights = explode('<br />', $weights);
          $prices = explode('<br />', $prices);
          $urls = explode('<br />', $urls);
        ?>
        
				<div class="additional-info">
          <a href="<?php echo $urls[0]; ?>">
            <span class="weight"><?php echo $weights[0]; ?></span>
            <span class="price"><?php echo $prices[0]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
        <div class="additional-info">
          <a href="<?php echo $urls[1]; ?>">
            <span class="weight"><?php echo $weights[1]; ?></span>
            <span class="price"><?php echo $prices[1]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
        <div class="additional-info">
          <a href="<?php echo $urls[2]; ?>">
            <span class="weight"><?php echo $weights[2]; ?></span>
            <span class="price"><?php echo $prices[2]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
			</div>
    </div>
		
		<!--blood nest ss-->
		<div class="column col1 tall last" style="float: right !important;">
			<?php
				$id = 140;
				$post = get_post($id);
				$feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
			?>
			
			<div class="pic container" style="height: 235px;">
				<img src="<?php echo $feat_image; ?>" style="height: 235px;" />
			</div>
			<div class="description red" style="height: 150px;">
				<div class="arrow rotate" style="bottom: 55px;right: 0px;"></div>
				<h3><?php echo $post->post_title; ?></h3>
				<?php echo $post->post_content; ?>
				
				<?php
          $weights = get_field('available_weight');
          $prices = get_field('prices');
          $urls = get_field('product_urls');
          
          $weights = explode('<br />', $weights);
          $prices = explode('<br />', $prices);
          $urls = explode('<br />', $urls);
        ?>
        
				<div class="additional-info">
          <a href="<?php echo $urls[0]; ?>">
            <span class="weight"><?php echo $weights[0]; ?></span>
            <span class="price"><?php echo $prices[0]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
        <div class="additional-info">
          <a href="<?php echo $urls[1]; ?>">
            <span class="weight"><?php echo $weights[1]; ?></span>
            <span class="price"><?php echo $prices[1]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
        <div class="additional-info">
          <a href="<?php echo $urls[2]; ?>">
            <span class="weight"><?php echo $weights[2]; ?></span>
            <span class="price"><?php echo $prices[2]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
			</div>
    </div>
		
		<!--orange nest ss-->
		<div class="column col2 wide first">
			<?php
				$id = 138;
				$post = get_post($id);
				$feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
			?>
			
			<div class="description yellow txt-left" style="height: 150px;">
				<div class="arrow" style="left: -3px;bottom: 50px;"></div>
				<h3><?php echo $post->post_title; ?></h3>
				<?php echo $post->post_content; ?>
				
				<?php
          $weights = get_field('available_weight');
          $prices = get_field('prices');
          $urls = get_field('product_urls');
          
          $weights = explode('<br />', $weights);
          $prices = explode('<br />', $prices);
          $urls = explode('<br />', $urls);
        ?>
        
				<div class="additional-info">
          <a href="<?php echo $urls[0]; ?>">
            <span class="weight"><?php echo $weights[0]; ?></span>
            <span class="price"><?php echo $prices[0]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
        <div class="additional-info">
          <a href="<?php echo $urls[1]; ?>">
            <span class="weight"><?php echo $weights[1]; ?></span>
            <span class="price"><?php echo $prices[1]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
        <div class="additional-info">
          <a href="<?php echo $urls[2]; ?>">
            <span class="weight"><?php echo $weights[2]; ?></span>
            <span class="price"><?php echo $prices[2]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
			</div>
			<div class="pic container">
				<img src="<?php echo $feat_image; ?>" />
			</div>
    </div>
    
    <!--blood nest sss-->
		<div class="column col1 tall">
			<?php
				$id = 212;
				$post = get_post($id);
				$feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
			?>
			<div class="pic container">
				<img src="<?php echo $feat_image; ?>" />
			</div>
			<div class="description red" style="height: 130px;">
				<div class="arrow" style="left: -5px; top: 165px;"></div>
				
				<h3><?php echo $post->post_title; ?></h3>
				<?php echo $post->post_content; ?>
				
        <?php
          $weights = get_field('available_weight');
          $prices = get_field('prices');
          $urls = get_field('product_urls');
          
          $weights = explode('<br />', $weights);
          $prices = explode('<br />', $prices);
          $urls = explode('<br />', $urls);
        ?>
        
        <div class="additional-info">
          <a href="<?php echo $urls[0]; ?>">
            <span class="weight"><?php echo $weights[0]; ?></span>
            <span class="price"><?php echo $prices[0]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
        <div class="additional-info">
          <a href="<?php echo $urls[1]; ?>">
            <span class="weight"><?php echo $weights[1]; ?></span>
            <span class="price"><?php echo $prices[1]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
        <div class="additional-info">
          <a href="<?php echo $urls[2]; ?>">
            <span class="weight"><?php echo $weights[2]; ?></span>
            <span class="price"><?php echo $prices[2]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
					
			</div>
    </div>
    
    <!--white nest sss-->
    <div class="column col2 wide last">
			<?php
				$id = 214;
				$post = get_post($id);
				$feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
			?>
		
			<div class="description gray" style="height: 130px;">
				<div class="arrow rotate" style="top: 55px;right: 0px;"></div>
				<h3><?php echo $post->post_title; ?></h3>
				<?php echo $post->post_content; ?>
				
				<?php
          $weights = get_field('available_weight');
          $prices = get_field('prices');
          $urls = get_field('product_urls');
          
          $weights = explode('<br />', $weights);
          $prices = explode('<br />', $prices);
          $urls = explode('<br />', $urls);
        ?>
        
				<div class="additional-info">
          <a href="<?php echo $urls[0]; ?>">
            <span class="weight"><?php echo $weights[0]; ?></span>
            <span class="price"><?php echo $prices[0]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
        <div class="additional-info">
          <a href="<?php echo $urls[1]; ?>">
            <span class="weight"><?php echo $weights[1]; ?></span>
            <span class="price"><?php echo $prices[1]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
        <div class="additional-info">
          <a href="<?php echo $urls[2]; ?>">
            <span class="weight"><?php echo $weights[2]; ?></span>
            <span class="price"><?php echo $prices[2]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
			</div>
			<div class="pic container">
				<img src="<?php echo $feat_image; ?>" />
			</div>
    </div>
    
    <!--orange nest sss-->
		<div class="column col2 wide last">
			<?php
				$id = 213;
				$post = get_post($id);
				$feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
			?>
			
			<div class="description yellow txt-left" style="height: 130px;">
				<div class="arrow" style="top: 115px;left: 0px;"></div>
				<h3><?php echo $post->post_title; ?></h3>
				<?php echo $post->post_content; ?>
				
				<?php
          $weights = get_field('available_weight');
          $prices = get_field('prices');
          $urls = get_field('product_urls');
          
          $weights = explode('<br />', $weights);
          $prices = explode('<br />', $prices);
          $urls = explode('<br />', $urls);
        ?>
        
				<div class="additional-info">
          <a href="<?php echo $urls[0]; ?>">
            <span class="weight"><?php echo $weights[0]; ?></span>
            <span class="price"><?php echo $prices[0]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
        <div class="additional-info">
          <a href="<?php echo $urls[1]; ?>">
            <span class="weight"><?php echo $weights[1]; ?></span>
            <span class="price"><?php echo $prices[1]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
        <div class="additional-info">
          <a href="<?php echo $urls[2]; ?>">
            <span class="weight"><?php echo $weights[2]; ?></span>
            <span class="price"><?php echo $prices[2]; ?></span>
            <img src="<?php bloginfo('template_url') ?>/images/basket.png" style="position: relative; top: 4px;" />
          </a>
        </div>
			</div>
      <div class="pic container">
				<img src="<?php echo $feat_image; ?>" />
			</div>
    </div>
    
		<div class="clear"></div>
  </div>

  <script>
    $(document).ready(function(){    
      $('#contact #location').bxSlider({
        prevText: 'Previous Store',
        prevSelector: '#contact .actions',
        nextText: 'Next Store',
        nextSelector: '#contact .actions'
      });
    });
  </script>
  
  <div id="contact" class="section">
    <div class="description">
      <h3>CONTACT US</h3>
      
      <div id="location">
        <?php
          $args = array(
            'numberposts' => -1,
            'category' => 15,
          );
          $posts = get_posts($args);
          
          foreach($posts as $post){
          // print_r($post);
        ?>
        <div>
          <p><?php echo $post->post_title ?>:</p>
          <?php echo $post->post_content; ?>
        </div>
        <?php } ?>
      </div>
      <div class="email">
        <p class="to">Email: info@naturalnest.com</p>
        
        <a href="<?php bloginfo('url') ?>/mail-us">
          <img src="<?php bloginfo('template_url') ?>/images/envelope.png" />
          <span>Send Us an Email</span>
        </a>
      </div>
      <div class="actions"></div>
    </div>
  </div>

  <div id="about" class="section">
    <div class="description">
      <?php
        $id = 9;
        $post = get_post($id);
        
        $str = explode('<hr />', $post->post_content);
        
        foreach($str as $s){
      ?>
        <div class="content-col">
          <?php echo $s ?>
        </div>
      <?php } ?>
    </div>
  </div>
<?php get_footer(); ?>
